package com.mz.ozy.adapter;


import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

import com.mz.ozy.fragment.ObShopFragment;

import java.util.ArrayList;
import java.util.List;

public class ObShopFragmentApader extends FragmentPagerAdapter {
    private List<ObShopFragment> mFragmentList;
    private ArrayList<String> mTitles;

    public ObShopFragmentApader(FragmentManager fm, List<ObShopFragment> mFragmentList, ArrayList<String> mTitles) {
        super(fm);
        this.mFragmentList = mFragmentList;
        this.mTitles = mTitles;
    }

    @Override
    public Fragment getItem(int position) {
        return mFragmentList.get(position);
    }

    @Override
    public int getCount() {
        return mFragmentList.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return mTitles.get(position);
    }
}